Skip to content

Add typed MergeBreakdownResponse and Claude 4.6 LLM variants#117

Merged
nikosbosse merged 4 commits intomainfrom
feat/regen-merge-breakdown-and-llm-enum
Feb 11, 2026
Merged

Add typed MergeBreakdownResponse and Claude 4.6 LLM variants#117
nikosbosse merged 4 commits intomainfrom
feat/regen-merge-breakdown-and-llm-enum

Conversation

@nikosbosse
Copy link
Contributor

@nikosbosse nikosbosse commented Feb 9, 2026

CLAUDE:

Summary

  • Add MergeBreakdownResponse typed model from regenerated API spec, replacing hand-parsed additional_properties in _extract_merge_breakdown()
  • Add CLAUDE_4_6_OPUS_* variants to LLMEnumPublic enum
  • Update TaskResultResponse with typed merge_breakdown field

The MergeBreakdownResponse model was previously picked up during an OpenAPI regen in #110 but didn't belong there. This gives merge breakdown extraction proper type safety instead of relying on dict access.

Test plan

  • Existing merge integration tests cover breakdown extraction
  • ruff lint passes on non-generated code

🤖 Generated with Claude Code

nikosbosse and others added 2 commits February 9, 2026 13:08
Regenerated models from current API spec:
- Add MergeBreakdownResponse typed model to TaskResultResponse, replacing
  hand-parsed additional_properties in _extract_merge_breakdown()
- Add CLAUDE_4_6_OPUS_* variants to LLMEnumPublic enum

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use (p[0], p[1]) instead of tuple(p) so basedpyright infers
tuple[int, int] rather than tuple[int, ...].

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor Author

@nikosbosse nikosbosse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CLAUDE: Looks good overall. The typed MergeBreakdownResponse is a clear improvement over the additional_properties dict access.

One minor observation on task.py:167-173:

exact=[(p[0], p[1]) for p in mb.exact] if not isinstance(mb.exact, Unset) else [],

The old code used mb.get("exact", []) or [] which also guarded against None/falsy values. The new code only guards against Unset. This is fine since the type annotation is list[list[int]] | Unset (no None), but it's a subtle behavioral change worth noting — if the API ever returns null for one of these fields instead of omitting it, the generated model type would need updating first anyway.

The index access p[0], p[1] (vs the old tuple(p)) is more explicit about expecting pairs, which is better.

No issues found. Ship it.

@nikosbosse nikosbosse requested a review from straeter February 9, 2026 14:06
@nikosbosse
Copy link
Contributor Author

@straeter Claude caught this as a drive-by improvement from a different PR and is confident this is better. Could you have a quick look please? I don't feel strongly either way.

@straeter
Copy link
Contributor

straeter commented Feb 9, 2026

@petermuehlbacher

@petermuehlbacher
Copy link
Contributor

I noted that something didn't go quite right when I deployed this, so I'm sure whatever this is will be an improvement!

nikosbosse and others added 2 commits February 11, 2026 15:17
Resolve import formatting conflicts in task_result_response.py

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nikosbosse
Copy link
Contributor Author

Peter and I deciding on which Claude Code changes to merge...

image

@nikosbosse nikosbosse merged commit 44ce423 into main Feb 11, 2026
4 checks passed
@nikosbosse nikosbosse deleted the feat/regen-merge-breakdown-and-llm-enum branch February 11, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants